package com.spz.demo.scloud.consumer.openfeign.controller;

import com.spz.demo.scloud.common.core.bean.RestBean;
import com.spz.demo.scloud.common.service.AppService;
import com.spz.demo.scloud.consumer.openfeign.service.IEurekaProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试 openFeign
 * @author spzmmd
 * @createTime 2021/04/12
 */
@RestController
@RequestMapping("/openFeign")
public class OpenFeignTestController {

    @Autowired
    private IEurekaProviderService eurekaProviderService;

    /**
     * 服务远程调用测试 - 使用 openFeign
     * @return
     */
    @RequestMapping("/projectInfo")
    public RestBean appServiceProjectInfo(){
        RestBean restBean = eurekaProviderService.projectInfo();
        return restBean;
    }

}
